package com.sikiedu.logindemo2.dao;

import com.sikiedu.logindemo2.domain.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    @Select("select * from user where username = #{username} and password = #{password}")
    User findUserByUsernameAndPassword(User user);
    @Select("select * from user where username = #{username}")
    User findUserByUsername(User user);
    @Insert("insert into user(username,password,email) values(#{username},#{password},#{email})")
    int addUser(User user);
}
